﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Globalization;
using System.Threading;
using System.Windows.Forms;
using HotelSoft.HotelManagement_BUS;
using HotelSoft.HotelManagement_DTO;

namespace HotelSoft.HotelManagement_GUI
{
    public partial class frmReport_PhieuDK : Form
    {
        PhieuDangKyBUS bus = new PhieuDangKyBUS();
        private string iSoPDK;

        public string SoPDK
        {
            get { return iSoPDK; }
            set { iSoPDK = value; }
        }

        public frmReport_PhieuDK()
        {
            InitializeComponent();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Viewphong_Load(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            docPhieuthue = new rptReport_Phieuthue();
            string s = Application.StartupPath + "\\rptReport_HoaDon.rpt";
            docPhieuthue.Load(s);

            PhieuDangKyDTO dto = new PhieuDangKyDTO();
            dto.SoPDK = iSoPDK;
            
            dt = bus.getInfo_report(dto);
            docPhieuthue.Database.Tables["command"].SetDataSource(dt);
            Viewphong.ReportSource = docPhieuthue;
           // docBaocaoHD.SetParameterValue("txtHinhthuc", "THÁNG " + "(" + dto.THANG + "/" + dto.NAM + ")"); 
        }

        private void frmReport_PhieuDK_Load(object sender, EventArgs e)
        {
            CultureInfo culture = (CultureInfo)CultureInfo.CurrentCulture.Clone();
            culture.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy";
            Thread.CurrentThread.CurrentCulture = culture;
        }

    }
}
